package com.mes.biz.domain;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;

import com.mes.common.core.domain.BaseEntity;
import lombok.Data;
import com.mes.common.utils.log.annotation.FieldRemark;
import com.mes.common.utils.log.annotation.LogField;
import com.mes.common.annotation.Excel;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 客户档案对象 biz_customer
 * @author hwg
 * @email hwg
 * @date 2023-04-30
 */
@Data
public class BizCustomer extends BaseEntity<BizCustomer>
{
    private static final long serialVersionUID = 1L;

    /** 客户类别 */
    @Excel(name = "客户类别", dictType = "customer_type")
    @NotBlank(message = "客户类别不允许为空")
    @LogField
    @FieldRemark(name = "客户类别",field = "customerCategory")
    private String customerCategory;

    /** 客户编码 */
    @Excel(name = "客户编码")
    @LogField
    @FieldRemark(name = "客户编码",field = "customerCode")
    private String customerCode;

    /** 客户名称 */
    @Excel(name = "客户名称")
    @NotBlank(message = "客户名称不允许为空")
    @LogField
    @FieldRemark(name = "客户名称",field = "customerName")
    private String customerName;

    /** 助记码 */
    @Excel(name = "助记码")
    @LogField
    @FieldRemark(name = "助记码",field = "mnemonicCode")
    private String mnemonicCode;

    /** 清账发货 */
    @Excel(name = "清账发货", dictType = "sys_yes_no")
    @NotBlank(message = "清账发货不允许为空")
    @LogField
    @FieldRemark(name = "清账发货",field = "isClear")
    private String isClear;

    /** 联系电话 */
    @Excel(name = "联系电话")
//    @NotBlank(message = "联系电话不允许为空")
    @LogField
    @FieldRemark(name = "联系电话",field = "phone")
    private String phone;

    /** 联系人 */
    @Excel(name = "联系人")
//    @NotBlank(message = "联系人不允许为空")
    @LogField
    @FieldRemark(name = "联系人",field = "contactPerson")
    private String contactPerson;

    /** 售价模式 */
    @Excel(name = "售价模式", dictType = "sale_type")
    @NotBlank(message = "售价模式不允许为空")
    @LogField
    @FieldRemark(name = "售价模式",field = "sellMode")
    private String sellMode;

    /** 业务员 */
    @Excel(name = "业务员")
//    @NotBlank(message = "业务员不允许为空")
    @LogField
    @FieldRemark(name = "业务员",field = "customernan")
    private String customernan;

    private String customernanName;
    /** 租户id */
    private String tenantId;

    private String userId;

    public void setCustomerCategory(String customerCategory)
    {
        this.customerCategory = customerCategory;
    }

    public String getCustomerCategory()
    {
        return customerCategory;
    }

    public void setCustomerCode(String customerCode)
    {
        this.customerCode = customerCode;
    }

    public String getCustomerCode()
    {
        return customerCode;
    }

    public void setCustomerName(String customerName)
    {
        this.customerName = customerName;
    }

    public String getCustomerName()
    {
        return customerName;
    }

    public void setMnemonicCode(String mnemonicCode)
    {
        this.mnemonicCode = mnemonicCode;
    }

    public String getMnemonicCode()
    {
        return mnemonicCode;
    }

    public void setIsClear(String isClear)
    {
        this.isClear = isClear;
    }

    public String getIsClear()
    {
        return isClear;
    }

    public void setPhone(String phone)
    {
        this.phone = phone;
    }

    public String getPhone()
    {
        return phone;
    }

    public void setContactPerson(String contactPerson)
    {
        this.contactPerson = contactPerson;
    }

    public String getContactPerson()
    {
        return contactPerson;
    }

    public void setSellMode(String sellMode)
    {
        this.sellMode = sellMode;
    }

    public String getSellMode()
    {
        return sellMode;
    }

    public void setCustomernan(String customernan)
    {
        this.customernan = customernan;
    }

    public String getCustomernan()
    {
        return customernan;
    }
    public void setCustomernanName(String customernanName)
            {
            this.customernanName = customernanName;
            }

    public String getCustomernanName()
            {
            return customernanName;
            }

    public void setTenantId(String tenantId)
    {
        this.tenantId = tenantId;
    }

    public String getTenantId()
    {
        return tenantId;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
            .append("customerCategory", getCustomerCategory())
            .append("customerCode", getCustomerCode())
            .append("customerName", getCustomerName())
            .append("mnemonicCode", getMnemonicCode())
            .append("isClear", getIsClear())
            .append("phone", getPhone())
            .append("contactPerson", getContactPerson())
            .append("sellMode", getSellMode())
            .append("customernan", getCustomernan())
            .append("tenantId", getTenantId())
            .append("remark", getRemark())
            .append("id", getId())
            .append("createBy", getCreateBy())
            .append("createDept", getCreateDept())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("updateIp", getUpdateIp())
            .append("version", getVersion())
            .append("delFlag", getDelFlag())
            .toString();
    }
}
